package com.crm.customers.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.crm.base.dao.BaseDao;
import com.crm.customers.dao.CustomerRecyclebinDao;
import com.crm.customers.model.CustomerRecyclebin;
@Repository("customerRecyclebinDao")
public class CustomerRecyclebinDaoImpl  extends BaseDao  implements CustomerRecyclebinDao {

	private  static final String MAPPER_NAMESAPCE = "CustomerRecyclebinMapper.";
	@Override
	public List<CustomerRecyclebin> getCustomerRecyclebinList(CustomerRecyclebin cc) {
		List<CustomerRecyclebin> list = selectList(MAPPER_NAMESAPCE+"getCustomerRecyclebinList", cc);
		if (list != null && list.size() > 0) {
			list.get(0).setTotalResults((Integer)selectOne(MAPPER_NAMESAPCE+"getCustomerRecyclebinListCount", cc));
		}
		return list;
	}

	@Override
	public int updateCustomerRecyclebin(CustomerRecyclebin cc) {
		return update(MAPPER_NAMESAPCE+"updateCustomerRecyclebin", cc);
	}

	@Override
	public int insertCustomerRecyclebin(CustomerRecyclebin cc) {
		return  insert(MAPPER_NAMESAPCE+"insertCustomerRecyclebin", cc);
	}

	@Override
	public CustomerRecyclebin getCustomerRecyclebinInfo(CustomerRecyclebin cc) {
		return selectOne(MAPPER_NAMESAPCE+"getCustomerRecyclebinList", cc);
	}

}
